package globals;

import org.newdawn.slick.Graphics;
import states.SlickGame;

public class DataTracker {
	int x,y;
	int dIA=0, dIB=0, dIC=0;
	float dFA=0, dFB=0, dFC=0;
	String dSA, dSB, dSC;
	String dataTitle;
	boolean typeint;
	public DataTracker(int xpos,int ypos,String title,String sa,String sb,String sc,boolean type){
		dataTitle=title;
		x=xpos;		y=ypos;
		dSA=sa;		dSB=sb;		dSC=sc;
		typeint=type;
	}
	public void updateint(int ia,int ib,int ic){
		dIA=ia;	dIB=ib;	dIC=ic;	typeint=true;
	}
	public void updatefloat(float x2,float y2,float f){
		dFA=x2;	dFB=y2;	dFC=f;	typeint=false;
	}
	public void draw(Graphics g){
		if(typeint){
			g.drawString(dataTitle+"\n"+dSA+":"+dIA+"\n"+dSB+":"+dIB+"\n"+dSC+":"+dIC, x, y);
		}
		else{
			g.drawString(dataTitle+"\n"+dSA+":"+dFA+"\n"+dSB+":"+dFB+"\n"+dSC+":"+dFC, x, y);
		}
	}
}
